#pragma once

using namespace std;
#include <map>
#include <vector>
#include "Emitter.h"

class ParticleManager
{
	map<string, Emitter> LoadedEmitters;
	list<Emitter> ActiveEmitters;
	/*ParticleManager(const ParticleManager&) = delete;
	ParticleManager& operator=(const ParticleManager&) = delete;*/

public:
	static ParticleManager*GetInstance();
	virtual ~ParticleManager();
	ParticleManager();

	bool LoadEmitter(string FileName);
	bool UnloadEmitter(string EmitterName);
	int CreateEmitter(string EmitterName,Entity*owner);
	bool FreeEmitter(int EmitterID);
	bool FreeAllEmitters();
	std::list<Emitter>::iterator& FreeEmitter(std::list<Emitter>::iterator& iter);
	void UpdateEmitter(float dt);
	void RenderEmitter();
};

